﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UtilZ.Dotnet.Ex.Base;

namespace UtilZ.Dotnet.Ex.Communication.Base
{
    /// <summary>
    /// 传输数据分包器接口
    /// </summary>
    public interface IUnpacker : IDisposableZ
    {
        /// <summary>
        /// 拆分完成的数据包输出事件
        /// </summary>
        event EventHandler<DataOutputArgs> PackOutput;

        /// <summary>
        /// 对数据进行拆包
        /// </summary>
        /// <param name="unpackerPara">分包参数</param>
        /// <returns>拆包成功的数据长度</returns>
        int UnPackge(IUnpackerPara unpackerPara);
    }
}
